<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png">
    <HelloWorld msg="Welcome to Your Vue.js App"/>
    <button @click="getRequest">发送请求</button>
  </div>
</template>

<script>
  import request from '../utils/request';
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

export default {
  name: 'Home',
  methods: {
    async getRequest() {
      let res = await request({
        method: 'GET',
        params: {
          type: 'getlistv3',
          act: 'home',
          pagesize: 30,
          pid: 26
        }
      });
      console.log(res);
    }
  },
  components: {
    HelloWorld
  }
}
</script>
